package com.ruoyi.webshop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.webshop.mapper.RepositoryInfoMapper;
import com.ruoyi.webshop.domain.RepositoryInfo;
import com.ruoyi.webshop.service.IRepositoryInfoService;

/**
 * 仓库Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-20
 */
@Service
public class RepositoryInfoServiceImpl implements IRepositoryInfoService 
{
    @Autowired
    private RepositoryInfoMapper repositoryInfoMapper;

    /**
     * 查询仓库
     * 
     * @param repositoryId 仓库主键
     * @return 仓库
     */
    @Override
    public RepositoryInfo selectRepositoryInfoByRepositoryId(Long repositoryId)
    {
        return repositoryInfoMapper.selectRepositoryInfoByRepositoryId(repositoryId);
    }

    /**
     * 查询仓库列表
     * 
     * @param repositoryInfo 仓库
     * @return 仓库
     */
    @Override
    public List<RepositoryInfo> selectRepositoryInfoList(RepositoryInfo repositoryInfo)
    {
        return repositoryInfoMapper.selectRepositoryInfoList(repositoryInfo);
    }

    /**
     * 新增仓库
     * 
     * @param repositoryInfo 仓库
     * @return 结果
     */
    @Override
    public int insertRepositoryInfo(RepositoryInfo repositoryInfo)
    {
        return repositoryInfoMapper.insertRepositoryInfo(repositoryInfo);
    }

    /**
     * 修改仓库
     * 
     * @param repositoryInfo 仓库
     * @return 结果
     */
    @Override
    public int updateRepositoryInfo(RepositoryInfo repositoryInfo)
    {
        return repositoryInfoMapper.updateRepositoryInfo(repositoryInfo);
    }

    /**
     * 批量删除仓库
     * 
     * @param repositoryIds 需要删除的仓库主键
     * @return 结果
     */
    @Override
    public int deleteRepositoryInfoByRepositoryIds(Long[] repositoryIds)
    {
        return repositoryInfoMapper.deleteRepositoryInfoByRepositoryIds(repositoryIds);
    }

    /**
     * 删除仓库信息
     * 
     * @param repositoryId 仓库主键
     * @return 结果
     */
    @Override
    public int deleteRepositoryInfoByRepositoryId(Long repositoryId)
    {
        return repositoryInfoMapper.deleteRepositoryInfoByRepositoryId(repositoryId);
    }
}
